package o;

import androidx.annotation.Nullable;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.source.TrackGroup;
import java.util.Arrays;
import java.util.Comparator;

public abstract class aku implements akz {
    private final long[] ˊ;
    protected final int ˋ;
    protected final int[] ˎ;
    protected final TrackGroup ˏ;
    private final Format[] ॱ;
    private int ᐝ;

    static final class c implements Comparator<Format> {
        private c() {
        }

        public /* synthetic */ int compare(Object obj, Object obj2) {
            return ॱ((Format) obj, (Format) obj2);
        }

        public int ॱ(Format format, Format format2) {
            return format2.ˏ - format.ˏ;
        }
    }

    public aku(TrackGroup trackGroup, int... iArr) {
        int i = 0;
        amm.ˏ(iArr.length > 0);
        this.ˏ = (TrackGroup) amm.ॱ(trackGroup);
        this.ˋ = iArr.length;
        this.ॱ = new Format[this.ˋ];
        for (int i2 = 0; i2 < iArr.length; i2++) {
            this.ॱ[i2] = trackGroup.ˊ(iArr[i2]);
        }
        Arrays.sort(this.ॱ, new c());
        this.ˎ = new int[this.ˋ];
        while (i < this.ˋ) {
            this.ˎ[i] = trackGroup.ˊ(this.ॱ[i]);
            i++;
        }
        this.ˊ = new long[this.ˋ];
    }

    public void ˋ() {
    }

    public void ˏ() {
    }

    public final TrackGroup ˊ() {
        return this.ˏ;
    }

    public final int ॱ() {
        return this.ˎ.length;
    }

    public final Format ॱ(int i) {
        return this.ॱ[i];
    }

    public final int ˊ(int i) {
        return this.ˎ[i];
    }

    public final Format ʻ() {
        return this.ॱ[ˎ()];
    }

    public void ˋ(float f) {
    }

    protected final boolean ˎ(int i, long j) {
        return this.ˊ[i] > j;
    }

    public int hashCode() {
        if (this.ᐝ == 0) {
            this.ᐝ = (System.identityHashCode(this.ˏ) * 31) + Arrays.hashCode(this.ˎ);
        }
        return this.ᐝ;
    }

    public boolean equals(@Nullable Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        aku o_aku = (aku) obj;
        if (this.ˏ == o_aku.ˏ && Arrays.equals(this.ˎ, o_aku.ˎ)) {
            return true;
        }
        return false;
    }
}
